Several forms of color space models exist within the television industry so as to properly represent and reproduce color in a physical device supporting a given color space model. For example, some of these models include Red, Green, Blue (RGB), YPbPr, ITU-R Recommendation BT.709, and ITU-R Recommendation BT.2020. Dynamic range is another aspect of brightness and color which has several forms including Standard Dynamic Range (SDR) and High Dynamic Range (HDR), which, in itself, is subject to various forms including, and not limited to, Perceptual Quantizer (PQ), HDR10, and Hybrid Log-Gamma (HLG). These dynamic range standards use different luminance curves.
In many instances, there is a need to convert between color space and/or dynamic range models. Implementation of color space and/or dynamic range conversions may employ direct mathematical formulae, but one existing approach uses 3-dimensional lookup tables (“3D LUTs”) that are used extensively throughout the video and film industry. In certain implementations, a 3D LUT may be applied using computer software or using an FPGA (or similar digital logic device).
Ideally, for color space conversions using a hardware configuration such as an FPGA, with no limitation in resources, if one were to map a color space to another, then all that is required is a 1D LUT. The incoming pixel (or look-up index) is normally in the form of, but not limited to, RGB with 10-bit values (bits 9 down to 0) for each color component. However, using a 1D LUT would require 2{circumflex over ( )}(10+10+10) or over 1 billion look-up values of 30-bits (or more for increased precision) each, which is a significant amount of electronic memory, even for a computer in today's standards.
By reducing the number of LUT elements and with interpolation on all 3 axes, a 3D LUT can be used effectively to map the incoming RGB value to a new one albeit with some precision loss. For example, a small (upper) portion of each incoming R, G, and B component value can be used as an index whereby each index is applied to one of three axes of a sub-cube that is represented by the LUT. The resulting look-up value is merely a point on the sub-cube and does not necessarily define the resulting value. Further processing requires interpolation of the look-up value using the remaining (lower) portion of the incoming R, G, and B component values. In such existing designs, a 3D LUT for color space conversion, for example, is normally 17×17×17 or 33×33×33 in size. Moreover, the data can be, for example, 16-bits of precision, which would effectively generate a total of 33×33×33×16×3 or 1,724,976 bits of information.